<?php 
namespace app\seller\validate;
use think\validate;
class BaseGoodsValidate extends Validate{
    //验证规则
    protected $rule = array(
		'product_name' => 'max:200',
		'cat_id'=>'number',
		'figure_nu' => 'max:150',
	);
    //验证失败提示信息
    protected $message = array(
		'product_name.max'=>'产品名称的值不能超过200个字符',
		'cat_id.number'=>'分类id的值必须是一个整数',
		'figure_nu.max'=>'产品图号的值不能超过150个字符',
);
    //验证场景
    protected $scene = array(
		'add'=>array('product_name','cat_id','figure_nu','resolve'),
		'edit'=>array('id','product_name','cat_id','figure_nu','resolve'),
	);

}